sync local with remote by vscode

I want to use vscode as my main code editor.
I need to sync my code from local to the remote GPU server.
I choose to use sftp extensions in vscode.
Aftering installing and reloading the extension, for Mac users, press cmd+shift+p and choose SFTP:Config.

It’s an important feature to sync one code copy to multiple servers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[
{
"name": "server1",
"context": "server1",
"protocol": "sftp",
"host": "server1",
"port": 22,
"username": "yezhe",
"remotePath": "/home/yezhe/workspace/project",
"privateKeyPath": "~/.ssh/id_rsa",
"ignore": [".vscode", ".git", ".DS_Store", "__pycache__"]
},
{
"name": "server2",
"context": "server2",
"protocol": "sftp",
"host": "server2",
"port": 22,
"username": "yezhe",
"remotePath": "/home/yezhe/workspace/project",
"privateKeyPath": "~/.ssh/id_rsa",
"ignore": [".vscode", ".git", ".DS_Store", "__pycache__"]
}
]

It’s important to give unique string in context fields or only the last context will be used

分享到